using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Mvc;

namespace ShopForWeb.UI.Controllers;
[Route("user")]
public class UserController : Controller
{
  public UserController() { }
  [Route("logout")]
  public async Task<IActionResult> LogoutAsync()
  {
    await this.HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
    return Redirect("/");
  }
}
